﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class TowerBase : MonoBehaviour
{
	[Header("塔台选择后的灯光")]
	public GameObject vfxPrefab;
	private static Queue<GameObject> wastes = new Queue<GameObject>();  // 所有TowerBase共有的

	[Header("当前基座上的防御塔")]
	public Tower tower;


	/// <summary>
	/// 创建选择效果
	/// </summary>
	public void CreateVFX() {
		GameObject g = Instantiate(vfxPrefab, transform);
		wastes.Enqueue(g);
	}

	public void DeleteVFX() {
		if (wastes.Count >= 1) {
			GameObject g = wastes.Dequeue();
			Destroy(g);
		}
	}
}
